[Cascade] Specify strict layout guidance for rows and cell#256630
Merged
eokoneyo merged 1 commit intoMar 9, 2026
Merged
Conversation
Contributor
|
🤖 Jobs for this PR can be triggered through checkboxes. 🚧
ℹ️ To trigger the CI, please tick the checkbox below 👇
|
kowalczyk-krzysztof
approved these changes
Mar 9, 2026
Contributor
Author
|
/ci |
Contributor
|
Starting backport for target branches: 9.3 https://github.com/elastic/kibana/actions/runs/22875857485 |
kibanamachine
pushed a commit
to kibanamachine/kibana
that referenced
this pull request
Mar 9, 2026
…56630) ## Summary This PR is part of the cascade performance improvement work(elastic#255745), culled from elastic#256037. Adds CSS `contain: layout style` and `overflowAnchor: none` to the DataCascade virtualized scroll container and row wrappers, scoping layout/style invalidation so that row DOM mutations during scrolling cannot trigger full-document relayouts. ## Changes - **`data_cascade_impl.styles.tsx`** (`cascadeTreeGridBlock`): add `contain: 'layout style'` and `overflowAnchor: 'none'` - **`cascade_row.styles.ts`** (`rowWrapper`): add `contain: 'layout style'` ## Performance impact (Generated by Cursor) Compared using Chrome DevTools trace profiles (baseline vs this PR) during scroll interaction: | Metric (per-second normalized) | Baseline | PR | Change | |---|---|---|---| | Layout total time | 3,737 us/s | 1,686 us/s | **-55%** | | Full (non-partial) layouts | 9 | **0** | **-100%** | | UpdateLayoutTree time | 63,821 us/s | 38,009 us/s | **-40%** | | Paint time | 4,392 us/s | 1,025 us/s | **-77%** | | Layout invalidations | 13.3/s | 6.7/s | **-50%** | | Style recalc triggers | 20.6/s | 9.6/s | **-54%** | | Long task (>50ms) time | 459,137 us/s | 237,431 us/s | **-48%** | | Avg frame time | 5.9 ms | 3.4 ms | **-42%** | | Worst-case frame | 203 ms | 73 ms | **-64%** | | Max dirty objects/layout | 864 | 414 | **-52%** | | Layout shifts | 4 | 2 | **-50%** | The headline result is **complete elimination of full document layouts** during scroll. The two nested containment boundaries (container + rows) ensure layout invalidation from virtualizer DOM mutations stays confined to the contained subtree, turning expensive full-document relayouts into cheap scoped partial layouts. `overflowAnchor: none` prevents additional layout passes from scroll anchoring adjustments during DOM recycling. <!-- ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md) - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [ ] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) - [ ] This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The `release_note:breaking` label should be applied in these situations. - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [ ] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) - [ ] Review the [backport guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing) and apply applicable `backport:*` labels. ### Identify risks Does this PR introduce any risks? For example, consider risks like hard to test bugs, performance regression, potential of data loss. Describe the risk, its severity, and mitigation for each identified risk. Invite stakeholders and evaluate how to proceed before merging. - [ ] [See some risk examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) - [ ] ... --> (cherry picked from commit 52968c7)
Contributor
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
kibanamachine
added a commit
that referenced
this pull request
Mar 9, 2026
…6630) (#256800) # Backport This will backport the following commits from `main` to `9.3`: - [[Cascade] Specify strict layout guidance for rows and cell (#256630)](#256630) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Eyo O. Eyo","email":"7893459+eokoneyo@users.noreply.github.com"},"sourceCommit":{"committedDate":"2026-03-09T21:34:44Z","message":"[Cascade] Specify strict layout guidance for rows and cell (#256630)\n\n## Summary\nThis PR is part of the cascade performance improvement\nwork(#255745), culled from\nhttps://github.com//pull/256037.\n\nAdds CSS `contain: layout style` and `overflowAnchor: none` to the\nDataCascade virtualized scroll container and row wrappers, scoping\nlayout/style invalidation so that row DOM mutations during scrolling\ncannot trigger full-document relayouts.\n\n## Changes\n\n- **`data_cascade_impl.styles.tsx`** (`cascadeTreeGridBlock`): add\n`contain: 'layout style'` and `overflowAnchor: 'none'`\n- **`cascade_row.styles.ts`** (`rowWrapper`): add `contain: 'layout\nstyle'`\n\n## Performance impact (Generated by Cursor)\n\nCompared using Chrome DevTools trace profiles (baseline vs this PR)\nduring scroll interaction:\n\n| Metric (per-second normalized) | Baseline | PR | Change |\n|---|---|---|---|\n| Layout total time | 3,737 us/s | 1,686 us/s | **-55%** |\n| Full (non-partial) layouts | 9 | **0** | **-100%** |\n| UpdateLayoutTree time | 63,821 us/s | 38,009 us/s | **-40%** |\n| Paint time | 4,392 us/s | 1,025 us/s | **-77%** |\n| Layout invalidations | 13.3/s | 6.7/s | **-50%** |\n| Style recalc triggers | 20.6/s | 9.6/s | **-54%** |\n| Long task (>50ms) time | 459,137 us/s | 237,431 us/s | **-48%** |\n| Avg frame time | 5.9 ms | 3.4 ms | **-42%** |\n| Worst-case frame | 203 ms | 73 ms | **-64%** |\n| Max dirty objects/layout | 864 | 414 | **-52%** |\n| Layout shifts | 4 | 2 | **-50%** |\n\nThe headline result is **complete elimination of full document layouts**\nduring scroll. The two nested containment boundaries (container + rows)\nensure layout invalidation from virtualizer DOM mutations stays confined\nto the contained subtree, turning expensive full-document relayouts into\ncheap scoped partial layouts. `overflowAnchor: none` prevents additional\nlayout passes from scroll anchoring adjustments during DOM recycling.\n\n","sha":"52968c7bcc3bb75f83fa57c3bbb8fcffaa260454","branchLabelMapping":{"^v9.4.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:SharedUX","backport:version","v9.4.0","v9.3.2"],"title":"[Cascade] Specify strict layout guidance for rows and cell","number":256630,"url":"https://github.com/elastic/kibana/pull/256630","mergeCommit":{"message":"[Cascade] Specify strict layout guidance for rows and cell (#256630)\n\n## Summary\nThis PR is part of the cascade performance improvement\nwork(#255745), culled from\nhttps://github.com//pull/256037.\n\nAdds CSS `contain: layout style` and `overflowAnchor: none` to the\nDataCascade virtualized scroll container and row wrappers, scoping\nlayout/style invalidation so that row DOM mutations during scrolling\ncannot trigger full-document relayouts.\n\n## Changes\n\n- **`data_cascade_impl.styles.tsx`** (`cascadeTreeGridBlock`): add\n`contain: 'layout style'` and `overflowAnchor: 'none'`\n- **`cascade_row.styles.ts`** (`rowWrapper`): add `contain: 'layout\nstyle'`\n\n## Performance impact (Generated by Cursor)\n\nCompared using Chrome DevTools trace profiles (baseline vs this PR)\nduring scroll interaction:\n\n| Metric (per-second normalized) | Baseline | PR | Change |\n|---|---|---|---|\n| Layout total time | 3,737 us/s | 1,686 us/s | **-55%** |\n| Full (non-partial) layouts | 9 | **0** | **-100%** |\n| UpdateLayoutTree time | 63,821 us/s | 38,009 us/s | **-40%** |\n| Paint time | 4,392 us/s | 1,025 us/s | **-77%** |\n| Layout invalidations | 13.3/s | 6.7/s | **-50%** |\n| Style recalc triggers | 20.6/s | 9.6/s | **-54%** |\n| Long task (>50ms) time | 459,137 us/s | 237,431 us/s | **-48%** |\n| Avg frame time | 5.9 ms | 3.4 ms | **-42%** |\n| Worst-case frame | 203 ms | 73 ms | **-64%** |\n| Max dirty objects/layout | 864 | 414 | **-52%** |\n| Layout shifts | 4 | 2 | **-50%** |\n\nThe headline result is **complete elimination of full document layouts**\nduring scroll. The two nested containment boundaries (container + rows)\nensure layout invalidation from virtualizer DOM mutations stays confined\nto the contained subtree, turning expensive full-document relayouts into\ncheap scoped partial layouts. `overflowAnchor: none` prevents additional\nlayout passes from scroll anchoring adjustments during DOM recycling.\n\n","sha":"52968c7bcc3bb75f83fa57c3bbb8fcffaa260454"}},"sourceBranch":"main","suggestedTargetBranches":["9.3"],"targetPullRequestStates":[{"branch":"main","label":"v9.4.0","branchLabelMappingKey":"^v9.4.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/256630","number":256630,"mergeCommit":{"message":"[Cascade] Specify strict layout guidance for rows and cell (#256630)\n\n## Summary\nThis PR is part of the cascade performance improvement\nwork(#255745), culled from\nhttps://github.com//pull/256037.\n\nAdds CSS `contain: layout style` and `overflowAnchor: none` to the\nDataCascade virtualized scroll container and row wrappers, scoping\nlayout/style invalidation so that row DOM mutations during scrolling\ncannot trigger full-document relayouts.\n\n## Changes\n\n- **`data_cascade_impl.styles.tsx`** (`cascadeTreeGridBlock`): add\n`contain: 'layout style'` and `overflowAnchor: 'none'`\n- **`cascade_row.styles.ts`** (`rowWrapper`): add `contain: 'layout\nstyle'`\n\n## Performance impact (Generated by Cursor)\n\nCompared using Chrome DevTools trace profiles (baseline vs this PR)\nduring scroll interaction:\n\n| Metric (per-second normalized) | Baseline | PR | Change |\n|---|---|---|---|\n| Layout total time | 3,737 us/s | 1,686 us/s | **-55%** |\n| Full (non-partial) layouts | 9 | **0** | **-100%** |\n| UpdateLayoutTree time | 63,821 us/s | 38,009 us/s | **-40%** |\n| Paint time | 4,392 us/s | 1,025 us/s | **-77%** |\n| Layout invalidations | 13.3/s | 6.7/s | **-50%** |\n| Style recalc triggers | 20.6/s | 9.6/s | **-54%** |\n| Long task (>50ms) time | 459,137 us/s | 237,431 us/s | **-48%** |\n| Avg frame time | 5.9 ms | 3.4 ms | **-42%** |\n| Worst-case frame | 203 ms | 73 ms | **-64%** |\n| Max dirty objects/layout | 864 | 414 | **-52%** |\n| Layout shifts | 4 | 2 | **-50%** |\n\nThe headline result is **complete elimination of full document layouts**\nduring scroll. The two nested containment boundaries (container + rows)\nensure layout invalidation from virtualizer DOM mutations stays confined\nto the contained subtree, turning expensive full-document relayouts into\ncheap scoped partial layouts. `overflowAnchor: none` prevents additional\nlayout passes from scroll anchoring adjustments during DOM recycling.\n\n","sha":"52968c7bcc3bb75f83fa57c3bbb8fcffaa260454"}},{"branch":"9.3","label":"v9.3.2","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Eyo O. Eyo <7893459+eokoneyo@users.noreply.github.com>
qn895
pushed a commit
to qn895/kibana
that referenced
this pull request
Mar 11, 2026
…56630) ## Summary This PR is part of the cascade performance improvement work(elastic#255745), culled from elastic#256037. Adds CSS `contain: layout style` and `overflowAnchor: none` to the DataCascade virtualized scroll container and row wrappers, scoping layout/style invalidation so that row DOM mutations during scrolling cannot trigger full-document relayouts. ## Changes - **`data_cascade_impl.styles.tsx`** (`cascadeTreeGridBlock`): add `contain: 'layout style'` and `overflowAnchor: 'none'` - **`cascade_row.styles.ts`** (`rowWrapper`): add `contain: 'layout style'` ## Performance impact (Generated by Cursor) Compared using Chrome DevTools trace profiles (baseline vs this PR) during scroll interaction: | Metric (per-second normalized) | Baseline | PR | Change | |---|---|---|---| | Layout total time | 3,737 us/s | 1,686 us/s | **-55%** | | Full (non-partial) layouts | 9 | **0** | **-100%** | | UpdateLayoutTree time | 63,821 us/s | 38,009 us/s | **-40%** | | Paint time | 4,392 us/s | 1,025 us/s | **-77%** | | Layout invalidations | 13.3/s | 6.7/s | **-50%** | | Style recalc triggers | 20.6/s | 9.6/s | **-54%** | | Long task (>50ms) time | 459,137 us/s | 237,431 us/s | **-48%** | | Avg frame time | 5.9 ms | 3.4 ms | **-42%** | | Worst-case frame | 203 ms | 73 ms | **-64%** | | Max dirty objects/layout | 864 | 414 | **-52%** | | Layout shifts | 4 | 2 | **-50%** | The headline result is **complete elimination of full document layouts** during scroll. The two nested containment boundaries (container + rows) ensure layout invalidation from virtualizer DOM mutations stays confined to the contained subtree, turning expensive full-document relayouts into cheap scoped partial layouts. `overflowAnchor: none` prevents additional layout passes from scroll anchoring adjustments during DOM recycling. <!-- ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md) - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [ ] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) - [ ] This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The `release_note:breaking` label should be applied in these situations. - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [ ] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) - [ ] Review the [backport guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing) and apply applicable `backport:*` labels. ### Identify risks Does this PR introduce any risks? For example, consider risks like hard to test bugs, performance regression, potential of data loss. Describe the risk, its severity, and mitigation for each identified risk. Invite stakeholders and evaluate how to proceed before merging. - [ ] [See some risk examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) - [ ] ... -->
Closed
2 tasks
sorenlouv
pushed a commit
that referenced
this pull request
Mar 17, 2026
## Summary This PR is part of the cascade performance improvement work(#255745), culled from #256037. Adds CSS `contain: layout style` and `overflowAnchor: none` to the DataCascade virtualized scroll container and row wrappers, scoping layout/style invalidation so that row DOM mutations during scrolling cannot trigger full-document relayouts. ## Changes - **`data_cascade_impl.styles.tsx`** (`cascadeTreeGridBlock`): add `contain: 'layout style'` and `overflowAnchor: 'none'` - **`cascade_row.styles.ts`** (`rowWrapper`): add `contain: 'layout style'` ## Performance impact (Generated by Cursor) Compared using Chrome DevTools trace profiles (baseline vs this PR) during scroll interaction: | Metric (per-second normalized) | Baseline | PR | Change | |---|---|---|---| | Layout total time | 3,737 us/s | 1,686 us/s | **-55%** | | Full (non-partial) layouts | 9 | **0** | **-100%** | | UpdateLayoutTree time | 63,821 us/s | 38,009 us/s | **-40%** | | Paint time | 4,392 us/s | 1,025 us/s | **-77%** | | Layout invalidations | 13.3/s | 6.7/s | **-50%** | | Style recalc triggers | 20.6/s | 9.6/s | **-54%** | | Long task (>50ms) time | 459,137 us/s | 237,431 us/s | **-48%** | | Avg frame time | 5.9 ms | 3.4 ms | **-42%** | | Worst-case frame | 203 ms | 73 ms | **-64%** | | Max dirty objects/layout | 864 | 414 | **-52%** | | Layout shifts | 4 | 2 | **-50%** | The headline result is **complete elimination of full document layouts** during scroll. The two nested containment boundaries (container + rows) ensure layout invalidation from virtualizer DOM mutations stays confined to the contained subtree, turning expensive full-document relayouts into cheap scoped partial layouts. `overflowAnchor: none` prevents additional layout passes from scroll anchoring adjustments during DOM recycling. <!-- ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md) - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [ ] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) - [ ] This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The `release_note:breaking` label should be applied in these situations. - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [ ] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) - [ ] Review the [backport guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing) and apply applicable `backport:*` labels. ### Identify risks Does this PR introduce any risks? For example, consider risks like hard to test bugs, performance regression, potential of data loss. Describe the risk, its severity, and mitigation for each identified risk. Invite stakeholders and evaluate how to proceed before merging. - [ ] [See some risk examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) - [ ] ... -->
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR is part of the cascade performance improvement work(#255745), culled from #256037.
Adds CSS
contain: layout styleandoverflowAnchor: noneto the DataCascade virtualized scroll container and row wrappers, scoping layout/style invalidation so that row DOM mutations during scrolling cannot trigger full-document relayouts.Changes
data_cascade_impl.styles.tsx(cascadeTreeGridBlock): addcontain: 'layout style'andoverflowAnchor: 'none'cascade_row.styles.ts(rowWrapper): addcontain: 'layout style'Performance impact (Generated by Cursor)
Compared using Chrome DevTools trace profiles (baseline vs this PR) during scroll interaction:
The headline result is complete elimination of full document layouts during scroll. The two nested containment boundaries (container + rows) ensure layout invalidation from virtualizer DOM mutations stays confined to the contained subtree, turning expensive full-document relayouts into cheap scoped partial layouts.
overflowAnchor: noneprevents additional layout passes from scroll anchoring adjustments during DOM recycling.